class_name Player
extends CharacterBody2D

#@onready var hit_component: HitComponent = $HitComponent

@export var current_tool: DataTypes.Tools = DataTypes.Tools.None

var player_direction: Vector2

func _ready() -> void:
	pass
#	ToolManager.tool_selected.connect(on_tool_selected)

func on_tool_selected(tool: DataTypes.Tools) -> void:
	current_tool = tool
	#hit_component.current_tool = tool

func move_to_grid(target_grid:Vector2i):
	var target_position = GridUtils.grid_to_world(target_grid)
	create_tween().tween_property(self,"position",target_position,0.2)
